package com.summer.order.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;


@Entity
@Table(name = "day_food")
public class DayFood implements java.io.Serializable{
	
	private static final long serialVersionUID = -2917054325834201283L;
	private String id;
	
	private Date date;

	private String weekday;
	
	private Food food1;
	private Food food2;
	
	private Boolean breakfast;
	private Boolean lunch;
	
	private Cookbook cookbook;
	
	private UserOrder userOrder;
	
	
	public DayFood(){}
	
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public String getId() {
		return id;
	}
	@Column(name="weekday")
	public String getWeekday() {
		return weekday;
	}
	
	@Column(name = "d_date")
	public Date getDate() {
		return date;
	}
	
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "food1")
	public Food getFood1() {
		return food1;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "food2")
	public Food getFood2() {
		return food2;
	}
	
	@Column(name = "breakfast")
	public Boolean getBreakfast() {
		return breakfast;
	}
	
	@Column(name = "lunch")
	public Boolean getLunch() {
		return lunch;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "cookbook_id", nullable = false)
	public Cookbook getCookbook() {
		return cookbook;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userorder_id")
	public UserOrder getUserOrder() {
		return userOrder;
	}

	public void setFood1(Food food1) {
		this.food1 = food1;
	}

	public void setFood2(Food food2) {
		this.food2 = food2;
	}
	public void setBreakfast(Boolean breakfast) {
		this.breakfast = breakfast;
	}
	public void setLunch(Boolean lunch) {
		this.lunch = lunch;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public void setDate(Date date) {
		this.date = date;
	}


	public void setWeekday(String weekday) {
		this.weekday = weekday;
	}

	
	public void setCookbook(Cookbook cookbook) {
		this.cookbook = cookbook;
	}
	
	public void setUserOrder(UserOrder userOrder) {
		this.userOrder = userOrder;
	}
	
}
